package com.sinai.mshab.client.services;

import com.google.gwt.user.client.rpc.AsyncCallback;
import com.sinai.mshab.client.util.AnswerCollection;
import com.sinai.mshab.client.ui.Key;

/**
 * This is the async version of the Service class.
 * 
 * @author serge
 * 
 */
public interface ServiceAsync {
	public void sendAnswer(AnswerCollection answer, Key key, AsyncCallback a);

	public void retrieveData(Key key, AsyncCallback a);

	public void validateLogin(String user, String pass, AsyncCallback a);

	public void resetPassword(String username, AsyncCallback a);

	public void getTables(AsyncCallback a);

	public void getColumnNames(AsyncCallback a);

	public void execteSQL(String sql, int start, int end, AsyncCallback a);

	public void validKey(Key k, AsyncCallback a);

	public void getSuggestions(String fieldName, String tableName,
			String types_so_far, AsyncCallback a);

	public void getUserPermission(String username, AsyncCallback a);

	public void authenticate(String username, String password, AsyncCallback a);
	
	public void storeFile(String fieldName, String tableName, Key dbKey,
			String filePath, AsyncCallback a);
}
